import { createSlice } from '@reduxjs/toolkit'

const userSlice = createSlice({
    name: "user",
    initialState: {
        userId: '', //存储userid
    },
    reducers: {
        saveUserId(state, { payload }) {
            state.userId = payload
        }
    }
})

export const { saveUserId } = userSlice.actions;
export default userSlice.reducer